﻿-- =============================================
-- Author:		GMH
-- Create date: 
-- Description:	
-- =============================================
CREATE PROCEDURE spEliminaPaquete
	@pnIdLaboratorio	INT,
	@pnIdPaquete		INT,
	@pnIdUsuarioMod		INT,
	@psIpMod			VARCHAR(15)
AS
BEGIN
	SET NOCOUNT ON;

--    DELETE FROM dbo.PaqueteEstudioDet WHERE IdLaboratorio = @pnIdLaboratorio AND IdPaquete = @pnIdPaquete
    
    UPDATE	dbo.PaqueteEstudio 
    SET		BajaLogica		= 1,
			IdUsuarioMod	= @pnIdUsuarioMod,
			IpMod			= @psIpMod,
			FechaMod		= GETDATE()
    WHERE	IdLaboratorio = @pnIdLaboratorio AND IdPaquete = @pnIdPaquete
	
	SET NOCOUNT OFF;
END